package com.htao.train.member.controller;

import jakarta.annotation.Resource;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.cloud.context.config.annotation.RefreshScope;
import org.springframework.core.env.Environment;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Author： HTTT
 * @Date： 2023/12/18 20:32
 * @Describe：
 */
@RestController
@RefreshScope
public class TestController {
    @Value("${test.nacos}")
    private String testNacos;
    @Resource
    Environment environment;
    @GetMapping("/hello")
    public String hello(){return environment.getProperty("local.server.port")+"hello Word"+testNacos;}


}
